Index: sys/dev/syscons/syscons.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/syscons/syscons.c,v
retrieving revision 1.409
diff -u -r1.409 syscons.c
--- sys/dev/syscons/syscons.c	29 Oct 2003 20:48:13 -0000	1.409
+++ sys/dev/syscons/syscons.c	4 Oct 2004 16:41:41 -0000
@@ -855,14 +855,16 @@
 	scrshot_t *ptr = (scrshot_t *)data;
 	void *outp = ptr->buf;
 
+	if (ptr->x < 0 || ptr->y < 0 || ptr->xsize < 0 || ptr->ysize < 0)
+		return EINVAL;
 	s = spltty();
 	if (ISGRAPHSC(scp)) {
 	    splx(s);
 	    return EOPNOTSUPP;
 	}
 	hist_rsz = (scp->history != NULL) ? scp->history->vtb_rows : 0;
-	if ((ptr->x + ptr->xsize) > scp->xsize ||
-	    (ptr->y + ptr->ysize) > (scp->ysize + hist_rsz)) {
+	if (((u_int)ptr->x + ptr->xsize) > scp->xsize ||
+	    ((u_int)ptr->y + ptr->ysize) > (scp->ysize + hist_rsz)) {
 	    splx(s);
 	    return EINVAL;
 	}
